import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Iterator;
import java.util.function.Consumer;

public class Main {
    public static void main(String[] args) {
        ArrayList<Integer> arr = new ArrayList<>();
        arr.add(1);
        arr.add(2);
        arr.add(3);
        Integer[] nums = {5, 2, 4, 3, 8, 6, 0, 1, 7, 9};
        Arrays.sort(nums, (o1, o2) -> o2 - o1);
        System.out.println(Arrays.toString(nums));
        for (int i : arr) {
            System.out.println(i);
        }
        arr.forEach(System.out::println);
    }
}